import java.awt.*;
import java.util.*;
import java.io.*;

public class JShape2D implements Serializable {	
		public enum ShapeType { LINE, RECTANGLE, ELLIPSE };
		
		private Shape shape;
		public int x1, y1;
		private Point start;
		private Point end;
		private Point center;
		private ShapeType type;
		private int location;
		private Color color;
		private boolean filled;
		private boolean selected;
		private float opacity;
 
		public JShape2D() {}
		
		public JShape2D(ShapeType s, Point start, Point end, Point center, Color c, boolean filled, float o) {
			this.type=s;
			this.start = start;
			this.end = end;
			this.center = center;
			this.color=c;
			this.filled=filled;
			this.opacity = o;
		}
		
		public Shape getShape() { return shape; }
		
		public void setShape(Shape s) { this.shape = s; }
		
		public ShapeType getType() { return type; }
		
		public void setType(ShapeType s) { this.type = s; }
		
		public Point getStart() { return start; }
		
		public void setStart(Point p) { start = p; }
		
		public Point getEnd() { return end; }
		
		public void setEnd(Point p) { end = p; }
		
		public Point getCenter() { return center; }
		
		public void setCenter(Point center) { this.center = center; }
		
		public int getLoc() { return location; }
		
		public void setLoc(int l) { location = l; }
		
		public Color getColor() { return color; }
		
		public void setColor(Color c) { this.color = c; }
		
		public float getOpacity() { return opacity; }
		
		public void setOpacity(Float o) { this.opacity = o; }
		
		public boolean isFilled() { return this.filled; }
		
		public void setFilled(boolean f) { this.filled = f; }
		
		public boolean isSelected() { return this.selected; }
		
		public void setSelected(boolean selected) { this.selected = selected; }
		
		public int getX() { return x1; }
		
		public int getY() { return y1; }
		
		public void setXY(int x, int y) {
			this.x1 = x;
			this.y1 = y;
		}
		
		public String toString() {
			StringBuilder sb=new StringBuilder();
			sb.append("Shape: "+this.type+"\n");
			sb.append("Color: "+this.color+"\n");
			sb.append("Fill Shape: "+this.filled+"\n");
			return sb.toString();
		}
	}